home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
wildcat
/
ctnews54.zip
/
LOGON.ZIP
/
LOGON.WCC
< prev
next >
Wrap
Text File
|
1995-06-05
|
5KB
|
171 lines
' LOGON.WCC enhanced by William Mantz
' from a Sample File included with MSI's wcCODE
' Authored by Unknown. Thanks to where-ever you are.
'
' It contains all the normal Wildcat! logon options first, then forces
' a NEWLETTER Read (if Newsltr was changed) No, it doesnt ask them if
' they wish to view it, it shows it to em! <g>
' Also, Added a CheckMailAtLogin for people that FAST LOGIN.
'
' Summary......
'
' LOGON.WCC does the NORMAL Wildcat Login as if no LOGON.WCC was here, but!
' IF it is a FAST Login, It doesn't display Hello's or Bulls, but will Display
' Newsltter (if Updated) and CheckMail at aLOgin is performed.
'
' This program also sends out a System wide page for callers loggin in
' to tell them that "Name: has just logged in." IT DOES NOT DO THIS
' for SYSOP's LOGGIN IN LOCALLY!!! Only Remote Callers. If you dont
' want this option, just edit this file and REMOVE the CALL NOTICE
' statements below.
'
' Compile information:
'
' WCC LOGON
'
' NOTE! LOGON.WCC and LOGON.WCX MUST BE LOCATED IN THE WC! HOME DIRECTORY
' FOR IT TO WORK.
' ************************************************************************
declare function commas(x as long) as string
DECLARE SUB NOTICE
dim today as datetime
dim i as integer
currentdatetime today
dim SysopLogIn as string * 1
dim n as integer, m as integer, c as integer
dim nrec as NodeInfoRecord
dim Page as string*79
dim PgMsg as String
dim Rand as integer
Dim SRec as SearchRec, FileFound as Integer
Dim FileDate as Date
Dim FileTime as Time
DIM SySop as String
Dim chWstr AS STRING
'Constants
Const DateMask = "dd/mm/yy"
Const TimeMask = "hh:mm"
i = -1
c = 0
n = Node
m = MaxNode
// This is for SYSOPs loggin in Locally. It will look for your
// Sysop Name and just do a CheckMail at Login only.
Sysop = TRIM(Makewild.SysopName)
Sysop = UCASE(Makewild.SysopName)
if (LOCAL) AND User.Name=SySop THEN
checkmailatlogon
End
End If
// Check for FastLogon, IF not then do the following
IF NOT (FASTLOGON) then
IF NOT(LOCAL) THEN CALL Notice
displaygroupfiles
subtext 1, commas(nodeinfo.callernum)
select case today.t.number\60
case 0 to 719
displayprompt 1365
case 720 to 1079
displayprompt 1366
case 1080 to 1440
displayprompt 1367
end select
if formatdate(today.d, "mm/dd") = formatdate(user.birthdate, "mm/dd") then
if not displayfile("birthday") then
beep
print
print "Happy birthday @FIRST@!"
end if
activitylog "Birthday Greeting Displayed"
end if
hellofiles
' checkNewsletter routine without asking <g>
FileFound = FindFirst(Conference.DisplayPath+"\NEWSLTR.BBS",0,SRec)
FileDate = SRec.Date
FileTime = SRec.Time
waitenter
if User.LastCall.D.Number <= FileDate.Number THEN
DisplayFile("NewsLtr")
ACTIVITYLOG "Newsletter File Displayed"
end if
' IF you make up a file called NOANSI.BBS and place it in your
' ..\DISP path, LOGON will display it to the user. I use this
' to inform the user how to activate ANSI cursor and color.
' Check and Display if NOT ANSI
IF NOT(ANSIDETECTED) THEN
chWstr = Conference.DisplayPath + "\NOANSI.BBS"
IF EXISTS(chWstr) THEN
DisplayTextFile(chWstr)
ACTIVITYLOG "NO ANSI File Displayed"
END IF
end if ' (NOT ANISDETECTED)
checkbulletins
quoteoftheday
checkmailatlogon
ELSE ' We have a Fast Logon if ELSE route is taken.
// END OF... IF NOT FASTLOGIN
if fastlogonchar <> "!" then
IF NOT(LOCAL) THEN CALL Notice
PRINT "@00@Command >> @0E@"
checkmailatlogon
' checkNewsletter routine without asking <g>
FileFound = FindFirst(Conference.DisplayPath+"\NEWSLTR.BBS",0,SRec)
FileDate = SRec.Date
FileTime = SRec.Time
If User.LastCall.D.Number <= FileDate.Number THEN
DisplayFile("NewsLtr")
ACTIVITYLOG "Newsletter File Displayed"
end if
end if
end if 'for if ELSE fast login
end
SUB NOTICE
Do
i = i + 1
GetNodeInfo nRec, i
If nRec.nodestatus >= 3 and i <> n then
Rand = int(rnd(100)*100)
if Rand <= 33 then
Page = "@0C@*NOTICE*@0B@ " + User.Name + " has just arrived on node "+str(n)
elseif Rand >= 34 and Rand <= 66 Then
Page = "@0C@HEY!!!@0A@ " + User.Name + " has just logged on to node: "+str(n)
else
Page = "@0C@LOOK!!@0D@ " + User.Name +" has just dropped in on node "+str(n)+" !!"
end if
SendPage i, Page
End if
Loop until i >= m
END SUB
function commas(x as long) as string
dim s as string
s = str(x)
dim j as integer
j = len(s)-2
do while j > 1
s = left(s, j-1) + "," + right(s, len(s)-j+1)
j = j - 3
loop
commas = s
end function